package com.company.user.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@ApiModel(value = "登录接口入参")
public class LoginReq extends UserIpReq{

    @ApiModelProperty(value = "登入用户名")
    private String loginName;
    @ApiModelProperty(value = "手机号")
    private String mobilePhone;
    @ApiModelProperty(value = "电子邮箱")
    private String email;
    @ApiModelProperty(value = "短信验证码 或者 邮箱验证码")
    private String messageCode;
    @ApiModelProperty(value = "登录密码")
    private String password;
    @ApiModelProperty(value = "登录方式", example = "1:账号密码登录 2:短信验证登录 3:邮箱登入 4:app扫码授权登录")
    @NotNull(message = "登录方式不能为空")
    private Integer way;
    @ApiModelProperty(value = "登入端口",example = "app:app端 win:pc端")
    @NotBlank(message = "登入端口不能为空")
    private String terminal;
    @ApiModelProperty(value = "登入类型", example = "1:员工登入 2:管理员登入 3:超级管理员登入")
    @NotNull(message = "登入类型不能为空")
    private Integer userType;

    //EMAIL 邮箱登入、mobilePhone 电话登入
    public static class messageCodeType {
        public static final String EMAIL = "email";
        public static final String MOBILEPHONE = "mobilePhone";
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getMessageCode() {
        return messageCode;
    }

    public void setMessageCode(String messageCode) {
        this.messageCode = messageCode;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getWay() {
        return way;
    }

    public void setWay(Integer way) {
        this.way = way;
    }

    public String getTerminal() {
        return terminal;
    }

    public void setTerminal(String terminal) {
        this.terminal = terminal;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }
}
